-- GENERATED SPELL FOR [Glommus] --


function spell0_2422(pUnit, Event) --@Battle Shout,Self--
pUnit:FullCastSpellOnTarget(9128,pUnit)
pUnit:RegisterEvent('Sorts_2422', 684, 1)
end

function spell1_2422(pUnit, Event) --@Demoralizing Shout,Self--
pUnit:FullCastSpellOnTarget(13730,pUnit)
pUnit:RegisterEvent('Sorts_2422', 30250, 1)
end

function spell2_2422(pUnit, Event) --@Knockdown,n/a--
pUnit:FullCastSpellOnTarget(11428,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2422', 2272, 1)
end

function Sorts_2422(pUnit, Event)
local choix_sorts_2422 = math.random(0, 2)
if choix_sorts_2422 == 0 then
pUnit:RegisterEvent('spell0_2422', 1, 1)
end
if choix_sorts_2422 == 1 then
pUnit:RegisterEvent('spell1_2422', 1, 1)
end
if choix_sorts_2422 == 2 then
pUnit:RegisterEvent('spell2_2422', 1, 1)
end
end

function mob2422_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2422', math.random(1500, 3000), 1)
end

function mob2422_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2422_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2422_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2422, 1, 'mob2422_Action')
RegisterUnitEvent(2422, 2, 'mob2422_Leave')
RegisterUnitEvent(2422, 3, 'mob2422_Kill')
RegisterUnitEvent(2422, 4, 'mob2422_Die')
